﻿using Dilon.Core.Service;
using Furion;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Dilon.Core
{
    /// <summary>
    /// 参数配置表
    /// </summary>
    [SugarTable("sys_config", TableDescription = "参数配置表")]
    public class SysConfig : DEntityBase
    {
        /// <summary>
        /// 名称
        /// </summary>
        [SugarColumn(ColumnDescription="名称", IsNullable = true)]
        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        [SugarColumn(ColumnDescription="编码", IsNullable = true)]
        public string Code { get; set; }

        /// <summary>
        /// 属性值
        /// </summary>
        [SugarColumn(ColumnDescription="属性值", IsNullable = true)]
        public string Value { get; set; }

        /// <summary>
        /// 是否是系统参数（Y-是，N-否）
        /// </summary>
        [SugarColumn(ColumnDescription="是否是系统参数", IsNullable = true)]
        public string SysFlag { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnDescription="备注", IsNullable = true)]
        public string Remark { get; set; }

        /// <summary>
        /// 状态（字典 0正常 1停用 2删除）
        /// </summary>
        [SugarColumn(ColumnDescription="状态")]
        public CommonStatus Status { get; set; } = CommonStatus.ENABLE;

        /// <summary>
        /// 常量所属分类的编码，来自于“常量的分类”字典
        /// </summary>
        [SugarColumn(ColumnDescription="常量所属分类的编码", IsNullable = true)]
        public string GroupCode { get; set; }

    }
}
